package com.wesh.home.exception;

import com.alibaba.csp.sentinel.slots.block.BlockException;
import com.wesh.home.model.Result;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class BlockHandlerException {

    private final static Logger logger = LoggerFactory.getLogger(BlockHandlerException.class);

    public static Result handlerException(Integer id, BlockException e){
        logger.error("异常：" + id, e.getMessage());
        return Result.error();
    }

}
